package org.murphy.mock_spring.interfaces;

import org.murphy.mock_spring.annotations.MockComponent;
import org.murphy.mock_spring.annotations.MockResource;

/**
* @Description: innit
* @Author: 45048254 Murphy C Wang
* @Date: 2019/6/19
*/
public interface InitContainer {
    /**
     * init object
     * P.S. all classes must have @MockComponent{@link MockComponent} and all fields must have @MockResource{@link MockResource}
     * @param self root object, default input himself
     * @param packagePath
     * @throws IllegalAccessException
     * @throws InstantiationException
     */
    void init(Object self, String packagePath) throws IllegalAccessException, InstantiationException;

    /**
     * init all classes contain {@link MockComponent}
     * @param packagePath
     * @throws IllegalAccessException
     * @throws InstantiationException
     */
    void initAllInstance(String packagePath) throws IllegalAccessException, InstantiationException;
}
